package com.jxdinfo.hussar.example.outsourcereportandcertimanage.specificationmaintenance.wsdspecificationmaintenance.controller;

import com.jxdinfo.hussar.support.mp.base.controller.HussarBaseController;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.jxdinfo.hussar.support.audit.core.annotations.AuditLog;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import com.jxdinfo.hussar.support.audit.core.enums.AuditEventGrade;
import com.jxdinfo.hussar.support.audit.core.enums.AuditEventType;
import com.jxdinfo.hussar.example.outsourcereportandcertimanage.specificationmaintenance.wsdspecificationmaintenance.model.WsdSpecificationMaintenance;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;
import java.util.Arrays;
import org.springframework.beans.factory.annotation.Autowired;
import com.jxdinfo.hussar.platform.core.base.apiresult.ApiResponse;
import org.springframework.web.bind.annotation.RequestBody;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import java.util.List;
import com.jxdinfo.hussar.example.outsourcereportandcertimanage.specificationmaintenance.wsdspecificationmaintenance.vo.WsdSpecificationMaintenancePageVO;
import com.jxdinfo.hussar.example.outsourcereportandcertimanage.specificationmaintenance.wsdspecificationmaintenance.service.WsdSpecificationMaintenanceService;
import org.springframework.web.bind.annotation.GetMapping;
import com.jxdinfo.hussar.example.outsourcereportandcertimanage.specificationmaintenance.wsdspecificationmaintenance.dto.WsdSpecificationMaintenanceSelectCondition;

/**
 * 型号规格维护信息表控制器
 */
@RestController(value = "outsourcereportandcertimanage.specificationmaintenance.wsdspecificationmaintenance.WsdSpecificationMaintenanceController")
@AuditLog(moduleName = "型号规格维护信息表")
@RequestMapping(value = "/outsourceReportAndCertiManage/specificationMaintenance/wsdSpecificationMaintenance")
public class WsdSpecificationMaintenanceController extends HussarBaseController<WsdSpecificationMaintenance, WsdSpecificationMaintenanceService> {

    private static final Logger logger = LoggerFactory.getLogger(WsdSpecificationMaintenanceController.class);

    @Autowired
    private WsdSpecificationMaintenanceService wsdSpecificationMaintenanceService;

    /**
     * 型号规格维护信息表新增或修改
     */
    @AuditLog(moduleName = "型号规格维护信息表", eventDesc = "新增或修改", eventGrade = AuditEventGrade.SERVICE_LOG_TYPE, evnetType = AuditEventType.INSERT)
    @PostMapping("insertOrUpdate")
    public ApiResponse<String> insertOrUpdate(@RequestBody WsdSpecificationMaintenance wsdSpecificationMaintenance) {
        return wsdSpecificationMaintenanceService.insertOrUpdate(wsdSpecificationMaintenance);
    }

    /**
     * 型号规格维护信息表表单查询
     */
    @AuditLog(moduleName = "型号规格维护信息表", eventDesc = "表单查询", eventGrade = AuditEventGrade.SERVICE_LOG_TYPE, evnetType = AuditEventType.QUERY)
    @GetMapping("formQuery")
    public ApiResponse<WsdSpecificationMaintenance> formQuery(@RequestParam(value = "id") String id) {
        return wsdSpecificationMaintenanceService.formQuery(id);
    }

    /**
     * 型号规格维护信息表表格自定义查询（带分页）
     *
     * @return 查询结果
     */
    @AuditLog(moduleName = "型号规格维护信息表", eventDesc = "表格自定义查询", eventGrade = AuditEventGrade.SERVICE_LOG_TYPE, evnetType = AuditEventType.QUERY)
    @PostMapping("ConditionFilterPage")
    public ApiResponse<WsdSpecificationMaintenancePageVO> ConditionFilterPage(@RequestBody WsdSpecificationMaintenanceSelectCondition wsdSpecificationMaintenanceSelectCondition) {
        return wsdSpecificationMaintenanceService.ConditionFilterPage(wsdSpecificationMaintenanceSelectCondition);
    }

    /**
     * 型号规格维护信息表表格批量物理删除
     *
     * @param ids id数组
     * @return 删除成功标识
     */
    @AuditLog(moduleName = "型号规格维护信息表", eventDesc = "批量物理删除", eventGrade = AuditEventGrade.SERVICE_LOG_TYPE, evnetType = AuditEventType.DELETE)
    @PostMapping("del")
    public ApiResponse<Boolean> del(@RequestParam(value = "ids") String[] ids) {
        return wsdSpecificationMaintenanceService.del(Arrays.asList(ids));
    }

    /**
     * 型号规格维护信息表表格批量删除
     *
     * @param ids id数组
     * @return 删除成功标识
     */
    @AuditLog(moduleName = "型号规格维护信息表", eventDesc = "批量删除", eventGrade = AuditEventGrade.SERVICE_LOG_TYPE, evnetType = AuditEventType.UPDATE)
    @PostMapping("flagDelete")
    public ApiResponse<Boolean> flagDelete(@RequestParam(value = "ids") String[] ids) {
        return wsdSpecificationMaintenanceService.flagDelete(Arrays.asList(ids));
    }

    /**
     * 型号规格维护信息表表格自定义查询（带分页）
     *
     * @return 查询结果
     */
    @AuditLog(moduleName = "型号规格维护信息表", eventDesc = "表格自定义查询", eventGrade = AuditEventGrade.SERVICE_LOG_TYPE, evnetType = AuditEventType.QUERY)
    @PostMapping("ConditionFilterPage_order_custom")
    public ApiResponse<WsdSpecificationMaintenancePageVO> ConditionFilterPage_order_custom(@RequestBody WsdSpecificationMaintenanceSelectCondition wsdSpecificationMaintenanceSelectCondition) {
        return wsdSpecificationMaintenanceService.ConditionFilterPage_order_custom(wsdSpecificationMaintenanceSelectCondition);
    }

    /**
     * 型号规格维护信息表表格自定义查询（带分页）
     *
     * @return 查询结果
     */
    @AuditLog(moduleName = "型号规格维护信息表", eventDesc = "表格自定义查询", eventGrade = AuditEventGrade.SERVICE_LOG_TYPE, evnetType = AuditEventType.QUERY)
    @PostMapping("ConditionFilterwsdSpecificationMaintenanceCondition_1Page")
    public ApiResponse<WsdSpecificationMaintenancePageVO> ConditionFilterwsdSpecificationMaintenanceCondition_1Page(@RequestBody WsdSpecificationMaintenanceSelectCondition wsdSpecificationMaintenanceSelectCondition) {
        return wsdSpecificationMaintenanceService.ConditionFilterwsdSpecificationMaintenanceCondition_1Page(wsdSpecificationMaintenanceSelectCondition);
    }

    /**
     * 型号规格维护信息表表格自定义查询（带分页）
     *
     * @return 查询结果
     */
    @AuditLog(moduleName = "型号规格维护信息表", eventDesc = "表格自定义查询", eventGrade = AuditEventGrade.SERVICE_LOG_TYPE, evnetType = AuditEventType.QUERY)
    @PostMapping("ConditionFilterwsdSpecificationMaintenanceCondition_1Page_order_custom")
    public ApiResponse<WsdSpecificationMaintenancePageVO> ConditionFilterwsdSpecificationMaintenanceCondition_1Page_order_custom(@RequestBody WsdSpecificationMaintenanceSelectCondition wsdSpecificationMaintenanceSelectCondition) {
        return wsdSpecificationMaintenanceService.ConditionFilterwsdSpecificationMaintenanceCondition_1Page_order_custom(wsdSpecificationMaintenanceSelectCondition);
    }

    /**
     * 型号规格维护信息表表格自定义查询（带分页）
     *
     * @return 查询结果
     */
    @AuditLog(moduleName = "型号规格维护信息表", eventDesc = "表格自定义查询", eventGrade = AuditEventGrade.SERVICE_LOG_TYPE, evnetType = AuditEventType.QUERY)
    @PostMapping("ConditionFilterwsdSpecificationMaintenanceCondition_1wsdSpecificationMaintenanceSort_1Page")
    public ApiResponse<WsdSpecificationMaintenancePageVO> ConditionFilterwsdSpecificationMaintenanceCondition_1wsdSpecificationMaintenanceSort_1Page(@RequestBody WsdSpecificationMaintenanceSelectCondition wsdSpecificationMaintenanceSelectCondition) {
        return wsdSpecificationMaintenanceService.ConditionFilterwsdSpecificationMaintenanceCondition_1wsdSpecificationMaintenanceSort_1Page(wsdSpecificationMaintenanceSelectCondition);
    }

    /**
     * 型号规格维护信息表表格自定义查询（带分页）
     *
     * @return 查询结果
     */
    @AuditLog(moduleName = "型号规格维护信息表", eventDesc = "表格自定义查询", eventGrade = AuditEventGrade.SERVICE_LOG_TYPE, evnetType = AuditEventType.QUERY)
    @PostMapping("ConditionFilterwsdSpecificationMaintenanceCondition_1wsdSpecificationMaintenanceSort_1Page_order_custom")
    public ApiResponse<WsdSpecificationMaintenancePageVO> ConditionFilterwsdSpecificationMaintenanceCondition_1wsdSpecificationMaintenanceSort_1Page_order_custom(@RequestBody WsdSpecificationMaintenanceSelectCondition wsdSpecificationMaintenanceSelectCondition) {
        return wsdSpecificationMaintenanceService.ConditionFilterwsdSpecificationMaintenanceCondition_1wsdSpecificationMaintenanceSort_1Page_order_custom(wsdSpecificationMaintenanceSelectCondition);
    }
}
